'use strict';

// const jwtErr = require('./middleware/jwtErr');
/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.v1.home.index);// 首页
  router.get('/api/verify', controller.v1.verify.verify);// 图片验证码
  router.post('/api/users/login', controller.v1.users.login);
  router.post('/api/users/register', controller.v1.users.register);
  router.resources('users', '/api/users', controller.v1.users);
  router.post('/api/upload', controller.v1.file.upload);// 单文件上传
  router.post('/api/uploads', controller.v1.file.uploads); // 多文件上传
};
